import request from './request.js'
import qs from "qs";
// 精品推荐
export const getJingPingData = () => request.get('/products/recommend')
// 热门兑换
export const getReMenData = () => request.get('/products/hot')
// 发送注册短信验证码 传参电话号码
export const sendSms = (params) => request.post('/sendSMS',qs.stringify(params))
// 发送登录请求 传参 verifyCode phone
export const phoneRegin = (params) => request.post('/phoneRegin',qs.stringify(params))
// 发送 获取用户信息的请求 /shop/userProfiles
export const getUserProfiles = () => request.get('/shop/userProfiles')
// 发送 商品搜索的接口  /products
export const products = (params) => request.get('/products',{params})
// 微信登录（这个接口必须用qs对数据进行格式化）
export const WeixinLoginApi = (params) => request.post(`/wechatUsers/PCLogin`, qs.stringify(params));
// 微信发送请求的接口 /wechatUsers/PCLogin
export const WeixinApi = (params) => request.post('/wechatUsers/PCLogin', qs.stringify(params));
// 手机绑定微信 /wechatUsers/binding
export const wechatUsersBinding = (params) => request.post('/wechatUsers/binding', qs.stringify(params));
// 解绑微信 /wechatUsers/unbindingWeChat
export const unWechatUsersBinding = () => request.put('/wechatUsers/unbindingWeChat');
// 商品详情的接口 /products/{id}
export const goodsMoreGoodsInfo = (params) => request.get(`/products/${params}`);

 